package com.guapi.service.impl;

import com.guapi.entity.Reply;
import com.guapi.repository.ReplyRepository;
import com.guapi.service.ReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReplyServiceImpl extends CacheServiceImpl<Reply> implements ReplyService {
    @Autowired
    private ReplyRepository replyRepository;

    @Override
    public List<Reply> getAllReply() {
        return replyRepository.findAll();
    }

    @Override
    public void insert(Reply reply) {
        replyRepository.insert(reply);
    }

    @Override
    public void delById(String id) {
        replyRepository.deleteById(id);
    }
}
